package com.sdgakj.enums;

public enum EnumSMSType
{
    SECURITY_CODE("1", "验证码"), NOTICE("2", "通知");
    
    private String code;
    
    private String name;
    
    private EnumSMSType(String code, String name)
    {
        this.code = code;
        this.name = name;
    }
    
    public String getCode()
    {
        return code;
    }
    
    public void setCode(String code)
    {
        this.code = code;
    }
    
    public String getName()
    {
        return name;
    }
    
    public void setName(String name)
    {
        this.name = name;
    }
    
    public static EnumSMSType getEnum(String value)
    {
        for(EnumSMSType e : EnumSMSType.values())
        {
            if(value.equals(e.getCode()))
            {
                return e;
            }
        }
        return null;
    }
}
